package com.yx.admin;
import java.awt.Toolkit;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.wb.swt.SWTResourceManager;
public class WebServer extends Shell {

	public WebServer(Display display) {
		super(display, SWT.CLOSE | SWT.MIN|SWT.TOOL);
		createContents();
	}
	public static void main(String args[]) {
		try {
			Display display = Display.getDefault();
			WebServer shell = new WebServer(display);
			shell.open();
			shell.layout();
			while (!shell.isDisposed()) {
				if (!display.readAndDispatch()) {
					display.sleep();
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	/**
	 * Create contents of the shell.
	 */
	protected void createContents() {
		setSize(450, 300);		
		setText("WebServer - Web服务器运行配置");
		setLayout(new FillLayout());
		int screenH = Toolkit.getDefaultToolkit().getScreenSize().height;
	    int screenW = Toolkit.getDefaultToolkit().getScreenSize().width;
		setBounds(screenW-830, screenH-435, 440, 380);
		setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		WebServerConfig WebServerConfig=new WebServerConfig(this,SWT.None);
	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}
}
